import http from '../index';

export const getAll = (data) => http({
    url: '/api/lots?' + data,
    method: 'get',
})

export const getAllLot = () => http({
    url: '/api/lots?pageno=1&countonepage=100000',
    method: 'get',
})

export const getLotByPmhbh = (data) => http({
    url: '/api/lots/pmhbh?pmhbh=' + data,
    method: 'get',
})

export const getDataBy = (data) => http({
    url: '/api/lots/getByInput?' + data,
    method: 'get',
})

export const addData = (data) => http({
    url: '/api/lots',
    method: 'post',
    data
})

export const editData = (data) => http({
    url: '/api/lots',
    method: 'put',
    data
})

export const delData = (data) => http({
    url: '/api/lots/' + data,
    method: 'delete',
    data
})

export const delAll = (data) => http({
    url: '/api/lots/deleteByIds?' + data,
    method: 'delete',
    data
})

export const getAllArea = () => http({
    url: '/api/regions',
    method: 'get'
})

export const getWthtbh = () => http({
    url: '/api/auctions/getWthtbh',
    method: 'get',
})

export const createPDF = (data) => http({
    url: '/api/confirmations/createpdf?' + data,
    method: 'post',
    data
})

export const submit = (data) => http({
    url: '/api/lots/Submit?' + data,
    method: 'put',
})

export const shelves = (data) => http({
    url: '/api/lots/Shelves?' + data,
    method: 'put',
})

export const getPmhbh = (data) => http({
    url: '/api/lots/getPmhbh',
    method: 'get',
})

export const getPmhOptions = (data) => http({
    url: '/api/lots/getPmhmc?pmhbh=' + data,
    method: 'get',
})

export const getTree = () => http({
    url: '/api/dicts/getByDict',
    method: 'get',
})

export const connect = (data) => http({
    url: '/api/lots/connect?' + data,
    method: 'get',
})

export const disConnect = (data) => http({
    url: '/api/lots/noconnect?' + data,
    method: 'get',
})